package com.honeybee.cloud.framework.base.exception.business;

import com.honeybee.cloud.framework.base.exception.ExceptionEnum;
import lombok.Getter;

/**
 * @Description 业务异常enums
 * @Author cheng
 * @Create 2018-12-08
 * @Since 1.0.0
 */
public enum BaseBizExceptionEnum {
    TOKEN_TIME_OUT(1, "token过期"),
    TOKEN_NOT_EXISTS(2, "token不存在"),
    HEADER_NOT_EXISTS(3, "头部参数不存在"),
    HTTP_REQUEST_EXP(4, "http请求响应异常"),
    STRATEGY_EXP(5, "策略模式异常");


    @Getter
    private Integer parentCode = ExceptionEnum.MISSING_REQUEST_PARAMETER_EXCEPTION.getCode();
    @Getter
    private Integer subCode;
    @Getter
    private String message;

    BaseBizExceptionEnum(Integer subCode, String message) {
        this.subCode = subCode;
        this.message = message;
    }
    public  String getParentMessage() {
        return ExceptionEnum.MISSING_REQUEST_PARAMETER_EXCEPTION.getRemark();
    }
}
